package main

import (
	"strings"
	"fmt"
	"time"
)

func MakeAddSuffix(suffix string) func(string) string {
	return func(name string) string {
		if !strings.HasSuffix(name, suffix) {
			fmt.Println("name", name)

			return name + suffix
		}
		return name
	}
}

func main() {

	start := time.Now()
	addBmp := MakeAddSuffix(".bmp")
	bmp := addBmp("file")
	fmt.Println(bmp)

	end := time.Now()
	dalta := end.Sub(start)
	fmt.Println(dalta)
}
